﻿namespace nHydrate.EFCore.EventArgs
{
	/// <summary>
	/// The event argument type of all property setters after the property is changed
	/// </summary>
	/// <typeparam name="T"></typeparam>
	public partial class ChangedEventArgs<T> : System.ComponentModel.PropertyChangingEventArgs
	{
		/// <summary>
		/// Initializes a new instance of the ChangingEventArgs class
		/// </summary>
		/// <param name="newValue">The new value of the property being set</param>
		/// <param name="propertyName">The name of the property being set</param>
		public ChangedEventArgs(T newValue, string propertyName)
			: base(propertyName)
		{
			this.Value = newValue;
		}
		/// <summary>
		/// The new value of the property
		/// </summary>
		public T Value { get; set; }
	}
}
